﻿/****************************************************************************
Copyright (c) 2014-2015 凌惊雪 微信:Lingjingxue 邮箱:lingjingxue@sina.com QQ:271487457

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/


using ServerBase.Config;
using ServerBase.Protocol;
using ServerBase.Other;
using UtilPublic.Serialization;
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;
using static ServerBase.Config.Conf;

namespace ServerGame.GameObject
{
    [Desc("玩家杂项数据")]
    [DataContract]
    public class DataMisc
    {

        #region 客户端特殊标记
        [Desc("客户端特殊标记")]
        [DataMember]
        public Dictionary<int, int> DictFlagClient = new Dictionary<int, int>();
        [Desc("客户端特殊标记每日")]
        [DataMember]
        public Dictionary<int, int> DictFlagClientDaily = new Dictionary<int, int>();
        #endregion


        #region 玩家

        [Desc("注册时间")]
        [DataMember]
        public long TicksRegister = 0;
        [Desc("上次登录时间")]
        [DataMember]
        public long TicksLastLogin = 0;
        [Desc("上次离线时间")]
        [DataMember]
        public long TicksLastLogout = 0;

        #endregion

        [Desc("封禁")]
        [DataMember]
        public long TickTimeBan = 0;
        public bool IsBan() { return DateTime.Now < new DateTime(TickTimeBan); }
        [Desc("禁言")]
        [DataMember]
        public long TickTimeBarred = 0;
        public bool IsBarred() { return DateTime.Now < new DateTime(TickTimeBarred); }

    }
}